<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div class="play">过山车</div>
  <div class="play">旋转木马</div>
  <div class="play">摩天轮</div>
  <div class="play">观影院</div>
</body>

</html>
<script>
  //获取类名为play的第一个div
  var firstPro = document.querySelector('.play')
  console.log(firstPro);
  //获取类名为paly所有的div
  var allPro = document.querySelectorAll('.play')
  console.log(allPro);
</script>